﻿/*
This project and all of its code is/are Copyright (C) 2017  Nils Hunter Alving

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
using DynamicDependencyContainer.Attributes;
using InterfaceTestData.Interfaces.PropertiesOnly;
using System;
using System.Collections.Generic;

namespace DynamicDependencyContainerContainerUnitTests
{
    public class TestData : ITestData
    {
        public IClaim ClaimData { get; set; }
        public IClaimRep ClaimRepData { get; set; }
        public List<IDamage> DamageData { get; set; }
        public IUser InsAppraiser { get; set; }
        public IUser InsClaimRep { get; set; }
        public IUser InsEstimateReviewer { get; set; }
        public IInspection InspectionData { get; set; }
        public IOwner OwnerData { get; set; }
        public IPreference PreferenceData { get; set; }
        public IProfile ProfileData { get; set; }
        public List<IProfile> Profiles { get; set; }
        [Dependency]
        public IRates RatesData { get; set; }
        [Dependency]
        public IReportViewer ReportViewer { get; set; }
        public IUser ShopAppraiser { get; set; }
        public int TestId { get; set; }
        public ITire TiresData { get; set; }
        public IUpdate UpdatesData { get; set; }
        public List<IUser> UserData { get; set; }
        public IVehicle VehicleData { get; set; }

        public TestData()
        {
            InitializeLists();
        }
        
        public TestData(IUser user) :   this()
        {
            UserData.Add(user);
        }

        public TestData(IUser user, IProfile profile)   :   this(user)
        {
            Profiles.Add(profile);
        }

        private void InitializeLists()
        {
            DamageData = new List<IDamage>();
            Profiles = new List<IProfile>();
            UserData = new List<IUser>();
        }
    }
}
